package Manager;

import Database.DurationDB;
import Entity.Duration;
import java.util.ArrayList;

/**
 *
 * @author CONG
 */
public class DurationManager {
    private ArrayList<Duration> listDuration;
    public DurationManager() {
        listDuration=new ArrayList<Duration>();
    }
    public void getDurationList(ArrayList<Duration> dur){
       // listDuration.clear();
        listDuration.addAll(dur);
    }
    public int getSize(){
        return listDuration.size();
    }
    public Duration getDuration(int index){
        return listDuration.get(index);
    }
    public boolean addDuration(Duration dur){
        return listDuration.add(dur);
    }
    public boolean deleteDuration(Duration dur){
        return listDuration.remove(dur);
    }
}
